-- GENERATED SPELL FOR [Spirit Wolf] --


function spell0_29264(pUnit, Event) --@Bash,n/a--
pUnit:FullCastSpellOnTarget(58861,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29264', 2000, 1)
end

function spell1_29264(pUnit, Event) --@Spirit Walk,n/a--
pUnit:FullCastSpellOnTarget(58875,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29264', 15000, 1)
end

function spell2_29264(pUnit, Event) --@Spirit Wolf Leap,n/a--
pUnit:FullCastSpellOnTarget(58867,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29264', 0, 1)
end

function spell3_29264(pUnit, Event) --@Twin Howl,Self--
pUnit:FullCastSpellOnTarget(58857,pUnit)
pUnit:RegisterEvent('Sorts_29264', 6000, 1)
end

function Sorts_29264(pUnit, Event)
local choix_sorts_29264 = math.random(0, 3)
if choix_sorts_29264 == 0 then
pUnit:RegisterEvent('spell0_29264', 1, 1)
end
if choix_sorts_29264 == 1 then
pUnit:RegisterEvent('spell1_29264', 1, 1)
end
if choix_sorts_29264 == 2 then
pUnit:RegisterEvent('spell2_29264', 1, 1)
end
if choix_sorts_29264 == 3 then
pUnit:RegisterEvent('spell3_29264', 1, 1)
end
end

function mob29264_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_29264', math.random(1500, 3000), 1)
end

function mob29264_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29264_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29264_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(29264, 1, 'mob29264_Action')
RegisterUnitEvent(29264, 2, 'mob29264_Leave')
RegisterUnitEvent(29264, 3, 'mob29264_Kill')
RegisterUnitEvent(29264, 4, 'mob29264_Die')
